feat: Implement 3D flight animation methods using Vedo (Issue #523)#909
Conversation
|
@GuilhermeAsura could you please fix tests and linters on CI? |
I'm on it! |
4a29817 to
aebdf6a
Compare
Gui-FernandesBR
left a comment
There was a problem hiding this comment.
the code coverall looks good, but needs refactor.
We can still add it to the next release (this month)
|
Before we merge this PR, some points should be addressed:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #909 +/- ##
===========================================
+ Coverage 80.27% 81.24% +0.96%
===========================================
Files 104 113 +9
Lines 12769 14814 +2045
===========================================
+ Hits 10250 12035 +1785
- Misses 2519 2779 +260 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I am working on this one locally |
|
@YuroCastroDev we would love to hear feedbacks from this feature. Do you think you could help us? |
ab5ef3d to
292eadf
Compare
Implement 3D visualization of flight results in the plots layer using the optional `vedo` library, addressing issue RocketPy-Team#523: - `animate_trajectory`: 6-DOF translation of the rocket relative to ground. - `animate_rotate`: rocket attitude (rotation) evolution during flight. `vedo` is added as an optional dependency under the `[animation]` extra (`pip install rocketpy[animation]`); both methods raise a descriptive ImportError with install instructions when it is missing. A bundled `default_rocket.stl` asset and unit tests for the animation methods are included, along with user docs (flight, installation) and a colab cell. Originally developed by Patrick Sampaio in the legacy `animate_flight` branch and adapted to the current Flight architecture. Co-Authored-By: GuilhermeAsura <gmslazzarini@gmail.com> Co-Authored-By: Gui-FernandesBR <guilherme_fernandes@usp.br> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
292eadf to
a39ec8f
Compare
Pull request type
Checklist
black rocketpy/ tests/) has passed locallypytest tests -m slow --runslow) have passed locallyCHANGELOG.mdhas been updated (if relevant)Current behavior
Currently, the
Flightclass lacks built-in methods for 3D visualization of the simulation results. Users wishing to visualize the rocket's trajectory or attitude must export data and use external tools or write custom scripts. This addresses Issue #523.New behavior
This PR integrates 3D visualization capabilities directly into the
Flightclass using thevedolibrary.Key Changes:
Flight:animate_trajectory(file_name, start, stop, time_step): Visualizes the 6-DOF translation of the rocket relative to the ground.animate_rotate(file_name, start, stop, time_step): Visualizes the specific attitude (rotation) of the rocket during flight.vedoas an optional dependency inpyproject.tomlunder the[animation]key.pip install rocketpy[animation].vedoand raise a descriptiveImportErrorwith installation instructions if it is missing.animate_flightbranch to match the currentFlightclass structure (e.g., removing deprecatedpostProcesscalls).Breaking change
Additional information
Acknowledgements
This feature was originally developed by Patrick Sampaio in the
animate_flightbranch. This PR adapts that work to the moderndevelopbranch structure and newer RocketPy architecture.Verification
A modular verification suite was added in
tests/animation_verification/to generate a dummy 3D model and test the invocation of the animation methods.